Repository navigation
Declare the landing-page class of OGC API - Common - Part 1 - #90
Merged
Merged
Conversation
The landing page, the API definition and the conformance declaration are the resources of the class landing-page of Common Part 1 (OGC 19-072), whose core holds only the HTTP and query-parameter tests. The service serves the three and declared core alone. Common Part 1 requires the landing page to link the conformance declaration under the relation type http://www.opengis.net/def/rel/ogc/1.0/conformance (/req/landing-page/root-success), and Features Part 1, on which Moving Features builds, under conformance (/req/core/root-success). The landing page links it under both. The three routes are marked with landing-page. ats_common_test.go holds a row per abstract test of the class, each read through the routing table the service runs. The API definition is validated against the OpenAPI 3.0 schema, vendored byte for byte in openapi/; it found the four EDR operations stating no responses, which OpenAPI 3.0 requires of every operation, and they state them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The class
landing-pageof OGC API - Common - Part 1 (OGC 19-072): its declaration, the link it requires, and a test row per abstract test.What the class is
Common Part 1 places the landing page, the API definition and the conformance declaration in the class
http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/landing-page, six abstract tests:root-op,root-success,api-definition-op,api-definition-success,conformance-op,conformance-success. Itscoreholds the HTTP and query-parameter tests only. The service serves the three resources and declares the class, and the three routes are marked with it.The conformance link
Two standards require the link from the landing page to the conformance declaration, each under its own relation type:
/req/core/root-success, on which Moving Features builds:conformance;/req/landing-page/root-success:http://www.opengis.net/def/rel/ogc/1.0/conformance.The landing page links
/conformanceunder both (relConformance), as the conformance declaration names a class under each spelling its standards publish.The API definition
/conf/landing-page/api-definition-successvalidates the API definition against a schema. The OpenAPI 3.0 schema the OpenAPI Initiative publishes is vendored byte for byte inopenapi/oas-3.0-schema.json, with its URL and sha256 inopenapi/README.md. Against it, the four EDR operations (position,area,trajectory,corridor) state noresponses, which OpenAPI 3.0 requires of every operation;edrPathsgives them the200response every other operation states.The tests
ats_common_test.goholds a row per abstract test, each naming its test, read through the routing table the service runs (newMux):TestCommonLandingPage: 200, thelandingPageschema, and theservice-desc, both conformance anddatalinks;TestCommonAPIDefinition: 200 and the OpenAPI 3.0 schema, with two documents the schema must refuse;TestCommonConformanceDeclaration: 200, theconfClassesschema, andcoreandlanding-pagelisted.The
landingPage,confClassesandlinkschemas of the vendored Moving Features document state the constraints of Common'slandingPage.yaml,confClasses.yamlandlink.yaml: the same required members, of the same types.TestCommonLandingPagefails with the Common relation type removed from the landing page.The samples of the landing page, the conformance declaration and the API definition, and
api/surface.json, are what the code writes.